import {createSlice, PayloadAction} from "@reduxjs/toolkit";
import { RootState } from "../store";

const selfEvaluation = createSlice({
    name: 'selfEvaluation',
    initialState: '',
    reducers: {
        reInitSelfEvaluation: (state, action) => action.payload,
        saveSelfEvaluation: (state, action: PayloadAction<string>) => {
            return action.payload
        }
    }
})

export default selfEvaluation.reducer;

export const getSelfEvaluation = (state: RootState) => state.selfEvaluation;

export const { saveSelfEvaluation, reInitSelfEvaluation } = selfEvaluation.actions;
